package com.wqz.service;

import com.wqz.dao.BookMapper;
import com.wqz.pojo.book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class bookServiceImpl implements bookService {

    @Autowired
    private BookMapper bookMapper;

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    @Override
    public int addBook(book book) {
        return bookMapper.addBook(book);
    }

    @Override
    public int deleteBookById(int id) {
        return bookMapper.deleteBookById(id);
    }

    @Override
    public int updateBook(book book) {
        return bookMapper.updateBook(book);
    }

    @Override
    public book queryBookById(int id) {
        return bookMapper.queryBookById(id);
    }

    @Override
    public List<book> queryAllBook() {
        return bookMapper.queryAllBook();
    }

    @Override
    public List<book> queryBookByName(String bookName) {
        return bookMapper.queryBookByName(bookName);
    }

    /**
     *	 查询所有培训人员
     *	page: 当前页
     *	rows: 每一页有多少行
     */


}
